package com.example.bzh.gamecat.ui.live.newest;

import android.content.Context;

import com.classic.adapter.BaseAdapterHelper;
import com.classic.adapter.CommonAdapter;
import com.example.bzh.gamecat.R;
import com.example.bzh.gamecat.bean.newest.DistractionListBean;
import com.example.bzh.gamecat.util.GlideImageLoad;

import java.util.List;

/**
 * Created by lenovo on 2016/8/18.
 */
public class NewestAdapter extends CommonAdapter<DistractionListBean> {


    public NewestAdapter(Context context, int layoutResId, List<DistractionListBean> data) {
        super(context, layoutResId, data);
    }

    @Override
    public void onUpdate(BaseAdapterHelper helper, DistractionListBean item, int position) {
        helper.setText(R.id.tv_news_show_name,item.getNickName())
                .setText(R.id.tv_news_show_homename,item.getName())
                .setText(R.id.tv_news_look_num,String.valueOf(item.getUserCount()))
                .setImageLoad(new GlideImageLoad()).setImageUrl(R.id.iv_news_show,item.getCover());
    }
}
